<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<div class="easyui-layout" fit="true">
	<div region="center" style="padding:1px;">
		<t:datagrid name="keywordList" 
			actionUrl="keywordController.do?datagrid&qyid=${qyid}" idField="id" fit="true"
			sortName="sortnum" sortOrder="asc">
			<t:dgCol title="编号" field="id" hidden="false"></t:dgCol>
			<t:dgCol title="关键词" field="keyword" width="150"></t:dgCol>
			<t:dgCol title="状态" field="status" width="50" dictionary="status"></t:dgCol>
			<t:dgCol title="操作" field="opt" width="150"></t:dgCol>
			<t:dgFunOpt funname="keywordSite(id)" title="分配站点" />
			<t:dgDelOpt title="删除" url="keywordController.do?del&id={id}" />
			<t:dgToolBar title="录入" icon="icon-add" width="800"
				url="keywordController.do?addorupdate&qyid=${qyid}" funname="add"></t:dgToolBar>
			<t:dgToolBar title="编辑" icon="icon-edit" width="800"
				url="keywordController.do?addorupdate" funname="update"></t:dgToolBar>
		</t:datagrid>
	</div>
</div>
<script>
	function keywordSite(id){ 
		var title = "分配站点";	
		var url = "siteController.do?toAssignSite&keywordid="+id;			
		$.dialog({
			content: 'url:'+url,
			title : title,
			cache:false,
			lock : true,
			width: 800,
		    height: 500,
		    cancelVal: '关闭',
		    cancel: true /*为true等价于function(){}*/
		});
	}
</script>